Skip to content

IPFS and stuff from dev#115

Open
MastaP wants to merge 402 commits intomainfrom
dev
Open

IPFS and stuff from dev#115
MastaP wants to merge 402 commits intomainfrom
dev

Conversation

@MastaP
Copy link
Member

@MastaP MastaP commented Dec 22, 2025

No description provided.

vrogojin and others added 3 commits January 11, 2026 23:54
When trust base verification is skipped (dev mode with custom aggregators),
the SDK's split operations fail with verification errors. This commit adds
bypasses for:

1. createSplitMintCommitments - Manually create mint commitments without
   the complex SplitMintReason that requires Merkle tree proofs

2. waitInclusionProof for mints - Use waitInclusionProofWithDevBypass
   instead of the SDK's version that requires authenticated proofs

3. createAndVerifyToken - Use SdkToken.fromJSON() instead of mint() to
   skip trust base verification when creating split tokens

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When splitting a token, the original token is burned and should not be
sent anywhere. The OutboxRecoveryService was incorrectly sending
SPLIT_BURN entries via Nostr, causing both the original token (999 SOL)
and the split recipient token (2 SOL) to be sent to the recipient.

Added finalizeSplitBurn() handler that just marks the entry as completed
without any Nostr delivery, similar to how SPLIT_MINT is handled.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
vrogojin and others added 3 commits January 12, 2026 13:04
IPNS publishing would return HTTP 200 but records might not persist.
This caused tokens to be lost on browser restart.

Changes:
- Add verifyIpnsRecord() to IpfsHttpResolver for post-publish verification
- Query routing API after publish to confirm record actually persisted
- Roll back sequence number if verification fails
- Add retry loop with exponential backoff for failed IPNS syncs
- Query gateway path and routing API in parallel for faster resolution
- Add isRetryAttempt flag to SyncQueue to prevent recursive retries
- Remove allow-offline=true flag that prevented DHT propagation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Genesis-only tokens (freshly minted, no transfers) lacked a stored
stateHash, causing warnings during spent-check validation. The SDK
was calculating it on-the-fly as a fallback, but this was inefficient.

Changes:
- Add currentStateHash field to TxfIntegrity interface
- Add needsStateHashComputation() and computeAndPatchStateHash() helpers
- Compute and persist stateHash during IPFS import for genesis tokens
- Update Zod schema to allow optional currentStateHash

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
vrogojin and others added 4 commits January 12, 2026 16:31
When IPNS detects a higher remote version and imports from it, the code
was not syncing the merged local state back to IPNS. This caused tokens
minted locally to be lost after restart if IPNS returned stale data.

Added localDiffersFromRemote() check after remote import in:
- syncFromIpns(): calls syncNow() if local has unique content
- handleHigherSequenceDiscovered(): schedules sync if local differs

This ensures newly minted tokens are published to IPNS even when
remote version was ahead during the initial sync.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Auto-open PaymentRequestsModal when new payment request arrives
- Switch to wallet tab on mobile when payment request is received
- Truncate long nametags in header (6 chars + ... + 3 chars)
- Fix modal z-index stacking issue with wallet header
- Fix TransactionHistoryModal title (was showing "Payment Requests")
During IPFS sync, tombstoned tokens are now verified against Unicity
instead of being skipped. This catches invalid tombstones from race
conditions or network errors, restoring tokens that are actually unspent.

Also adds localStorage persistence for SPENT token verification cache
to avoid re-verifying known-spent tokens on page reload. The cache is
cleared when proofs are regenerated via devRefreshProofs().

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
vrogojin and others added 3 commits January 14, 2026 15:12
- Make newStateHash optional in TxfTransaction for older tokens
- Make nametags and _integrity optional in TxfToken schema
- Remove excessive getCurrentStateHash warnings for missing newStateHash
- Change Zod validation errors from console.warn to console.debug
- Add graceful handling for missing newStateHash in TokenValidationService
- Fix wallet creation flow by adding setImportInProgress() flag

The TXF schema changes fix validation failures and eliminate repeated
warnings for tokens created before newStateHash was added to transfers.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
KruGoL and others added 30 commits February 12, 2026 01:37
…file

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ve-legacy

Feat/sdk integration remove legacy
Add max-h-[85vh] and overflow-y-auto to the modal content container
so users on small screens can scroll to reach the checkboxes and button.
type errors fixed:

  1. Asset type - Added confirmedAmount, unconfirmedAmount, confirmedTokenCount, unconfirmedTokenCount to L1 ALPHA asset and SwapModal assets
  2. BrowserProvidersConfig - Added groupChat to the local type declaration
  3. useBalance - Fixed to use getAssets() instead of removed getBalance() for portfolio total
fix: resolve logout→import hang and nametag recovery after import
chore: remove unused dependencies and update sphere-sdk to 0.3.2
…3 UX

- Resize all onboarding screens (Start, RestoreMethod, Restore, ImportFile,
  PasswordPrompt, AddressSelection, Nametag, Processing, Scanning) to fit
  within the wallet panel instead of full-page layout
- Remove md: responsive breakpoints that were too large for panel context
- Add direct address send mode as a subtle fallback option in SendModal
- Add insufficient balance validation on amount step in SendModal
- Change amount input to text+inputMode to prevent +/-/e characters
- Disable Send button when user has no sendable tokens
- Show nametag OR direct address (not both) in AddressSelector
- Increase nametag truncation max length from 12 to 20 characters
Replace arbitrary bracket values (e.g. max-w-[360px]) with Tailwind canonical
equivalents (e.g. max-w-90) to resolve suggestCanonicalClasses linter warnings
across 15 files.
…r to theme toggle

Use CoinGecko API directly in production builds instead of relying on
Vite dev proxy, which caused 404 errors on GitHub Pages. Also add
cursor-pointer to the theme toggle button for better UX.
fix: use direct CoinGecko API URL in production and add cursor-pointe…
When creating a new address, first call switchToAddress to create and
switch, then check if SDK recovered a nametag from Nostr. Only show
the nametag input modal if no existing nametag was found.

- handleNewClick: create address first, check identity.nametag, skip modal if exists
- handleCreateWithNametag: use registerNametag on current address
- handleCreateWithoutNametag: simplified (address already created)
- useCreateAddress: same flow — skip to complete if nametag recovered

Requires sphere-sdk change: switchToAddress now calls
syncIdentityWithTransport for all addresses (not just those with
local nametag), enabling nametag recovery via transport.resolve().

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…w-address

fix: resolve existing nametag before prompting on new address creation
…tag-stale

fix: stale nametag on address switch + SDK switchToAddress timeout
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants